package cn.com.huzo.model.entities.trade;

import com.fasterxml.jackson.annotation.JsonFormat;
import huzofw.model.entities.BaseEntity;
import huzofw.model.entities.IAggregateRoot;
import java.io.Serializable;
import java.sql.Timestamp;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 化检日记账资财明显记录实体类
 * <p>
 * @author 范学春
 */
public class InspectionJournalLinesMaterialEntity extends BaseEntity implements Serializable, IAggregateRoot {

    private static final long serialVersionUID = 2205423203947951669L;
    private String LinesId;
    private Long HeaderId;
    private String NoOfStyleLinesId;               // 款号明细标识
    private Long ProductId;
    private Long MaterialId;
    private String MaterialCode;
    private String MaterialName;
    private Long UomId;
    private String UomName;
    private String MaterialColour;                 // 材料颜色 
    private Timestamp DateOfMaterialPrepared;      // 料齐日
    private String Description;                    // 备注

    public String getLinesId() {
        return LinesId;
    }

    public void setLinesId(String LinesId) {
        this.LinesId = LinesId;
    }

    public Long getHeaderId() {
        return HeaderId;
    }

    public void setHeaderId(Long HeaderId) {
        this.HeaderId = HeaderId;
    }

    public String getNoOfStyleLinesId() {
        return NoOfStyleLinesId;
    }

    public void setNoOfStyleLinesId(String NoOfStyleLinesId) {
        this.NoOfStyleLinesId = NoOfStyleLinesId;
    }

    public Long getProductId() {
        return ProductId;
    }

    public void setProductId(Long ProductId) {
        this.ProductId = ProductId;
    }

    public Long getMaterialId() {
        return MaterialId;
    }

    public void setMaterialId(Long MaterialId) {
        this.MaterialId = MaterialId;
    }

    public String getMaterialCode() {
        return MaterialCode;
    }

    public void setMaterialCode(String MaterialCode) {
        this.MaterialCode = MaterialCode;
    }

    public String getMaterialName() {
        return MaterialName;
    }

    public void setMaterialName(String MaterialName) {
        this.MaterialName = MaterialName;
    }

    public Long getUomId() {
        return UomId;
    }

    public void setUomId(Long UomId) {
        this.UomId = UomId;
    }

    public String getUomName() {
        return UomName;
    }

    public void setUomName(String UomName) {
        this.UomName = UomName;
    }

    public String getMaterialColour() {
        return MaterialColour;
    }

    public void setMaterialColour(String MaterialColour) {
        this.MaterialColour = MaterialColour;
    }

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    public Timestamp getDateOfMaterialPrepared() {
        return DateOfMaterialPrepared;
    }

    public void setDateOfMaterialPrepared(Timestamp DateOfMaterialPrepared) {
        this.DateOfMaterialPrepared = DateOfMaterialPrepared;
    }

    public String getDescription() {
        return Description;
    }

    public void setDescription(String Description) {
        this.Description = Description;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (!(o instanceof InspectionJournalLinesMaterialEntity)) {
            return false;
        }

        final InspectionJournalLinesMaterialEntity that = (InspectionJournalLinesMaterialEntity) o;

        return new EqualsBuilder()
                .append(this.getLinesId(), that.getLinesId())
                .isEquals();
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public int hashCode() {
        int result = 17;
        result = 31 * result + this.getLinesId().hashCode();

        return result;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public String toString() {
        return ToStringBuilder.reflectionToString(this);
    }
}
